/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.money.biz.impl;

import com.money.biz.TypeBiz;
import com.money.dao.TypeDao;
import com.money.entity.Type;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 *
 * @author Eason
 */
@Service("typeBiz")
public class TypeBizImpl implements TypeBiz {

    @Resource(name = "typeDao")
    private TypeDao dao;

    @Override
    public void addType(Type type) {
        dao.addType(type);
    }


    @Override
    public void editType(Type type) {
        dao.editType(type);
    }

    @Override
    public void removeType(int id) {
        dao.removeType(id);
    }

    public Type getTypeByID(int id) {
        return dao.getTypeByID(id);
    }

    @Override
    public List getAllType() {
        return dao.getAllType();
    }

    @Override
    public List getAllSubtype() {
        return dao.getAllSubtype();
    }

    @Override
    public List getSubTypeByType(String typeID) {
        return dao.getSubTypeByType(typeID);
    }
    
    public List getTypeByTypeID(String typeID){
        return dao.getTypeByTypeID(typeID);
    }
}
